<canvas id="studentChart" width="150" height="150"></canvas>
<script>
    $(function () {
        var ctx = document.getElementById("studentChart").getContext('2d');
        var myChart = new Chart(ctx, {
            type: 'pie',
            data:{
                labels: ["男","女",'其他'],
                datasets: [
                    {
                        // label: "男老师",
                        data: [{{ $studentBoy }},{{ $studentGirl }},{{ $studnetElse }}],
                        backgroundColor:[
                            'rgba(54, 162, 235, 0.5)',
                            'rgba(255, 99, 132, 0.5)',
                            'rgba(255, 206, 86, 0.5)',
                        ]

                    }
                ]
            }
        });
    });
</script>